<template>
	<div>
		<el-table
		      :data="formData"
		      style="width: 100%">
		      <el-table-column
		        prop="username"
		        label="会员"
		        width="180">
		      </el-table-column>
			  <el-table-column
			    prop="mainPhone"
			    label="会员联系电话">
			  </el-table-column>
			  <el-table-column
			    prop="familyusername"
			    label="家庭成员姓名"
			    width="180">
			  </el-table-column>
		      <el-table-column
		        prop="mobile"
		        label="家庭成员联系电话">
		      </el-table-column>
			  <el-table-column label="核销类型">
			  	<!-- 核销状态 0未核销 1已核销 -->
			  	<template slot-scope="{row}">
			  		<el-tag v-if="row.verifiy_status==0">未核销</el-tag>
			  		<el-tag v-if="row.verifiy_status==1" type="success">已核销</el-tag>
			  	</template>
			  </el-table-column>
			  <el-table-column label="核销码">
			  	<template slot-scope="{row}">
			  		<el-image style="width:60px;height:60px" :src="'https://mtang.zxkjnc.com'+row.activity_code" :preview-src-list="['https://mtang.zxkjnc.com'+row.activity_code]">
			  		</el-image>
			  	</template>
			  </el-table-column>
		    </el-table>
	</div>
	
</template>

<script>
	import { imghttp,get,post,del } from '@/assets/js/http'
	// import { Editor, Toolbar } from "@wangeditor/editor-for-vue";
	export default {
		name: "member-search",
		props: {
			formData: {
				type: Array,
				default: () => []
			},
		},
		components: {
			// "el-upload-image": () => import("@/components/el-upload-image.vue"),
			// "maps": () => import("@/components/map/index.vue"),
			// Editor,
			// Toolbar
		},
		mounted() {
			// this.getcommuity() 
		},
		data() {
			return {
				// editor: null,
				// toolbarConfig: {},
				// editorConfig: {
				//     MENU_CONF: {
				//         uploadImage: {
				//             fieldName: "file",
				//             server: "/admin/ajax/upload",
				//             headers: {
				//                 batoken: this.$store.state.token
				//             },
				//             /* eslint-disable-next-line */
				//             customInsert(res, insertFn) {
				//                 insertFn(
				//                     "https://mtang.zxkjnc.com" + res.data.file.url
				//                 );
				//             }
				//         }
				//     }
				// },
				// mode: "default",
				// formRules: {
				// 	img: [{
				// 		required: true,
				// 		message: '请上传',
				// 		trigger: 'change'
				// 	}],
				// 	desc: [{required: true,message: '请输入',trigger: 'change'},],
				// 	location: [{required: true,message: '请输入',trigger: 'change'},],
				// 	activity_name: [{required: true,message: '请输入',trigger: 'change'},],
				// 	type: [{required: true,message: '请选择',trigger: 'change'},],
				// 	time: [{required: true,message: '请选择',trigger: 'change'},],
				// 	sign_num: [{required: true,message: '请输入',trigger: 'change'},],
				// 	sign_money: [{required: true,message: '请输入',trigger: 'change'}],
				// 	score: [{required: true,message: '请输入',trigger: 'change'}],
				// 	sort: [{required: true,message: '请输入',trigger: 'change'}],
				// 	community_id: [{required: true,message: '请选择',trigger: 'change'},],
				// },
				// title:'请上传1.5:1比例的图片',
				// typelist:[{id:1,title:'志愿者招募活动'},{id:2,title:'普通活动'}],//1志愿者招募活动2普通活动
				// comlist:[],//社区列表
				// paylist:['未支付','已支付'],////支付状态 0未支付 1已支付
			};
		},
		beforeDestroy() {
		    // const editor = this.editor;
		    // if (editor == null) return;
		    // editor.destroy();
		},
		methods: {
			// onCreated(editor) {
			//     this.editor = Object.seal(editor);
			// },
			// onConfirm() {
			// 	// console.log(this.formData.desc)
			// 	// return
			// 	this.$refs.formRef.validate((valid) => {
			// 		if (valid) {
			// 			 this.formData.admin_id = this.$store.state.id
			// 			 // this.formData.time = [this.formData.time[0]/1000,this.formData.time[1]/1000]
			// 			 this.formData.start_time = this.formData.time[0]/1000
			// 			 this.formData.end_time= this.formData.time[1]/1000
			// 			 this.formData.latitude = this.formData.location.lat
			// 			 this.formData.longitude = this.formData.location.lng
			// 			// alert('submit!');
			// 			console.log(this.formData,this.formData.desc)
			// 			this.$emit("search", this.formData);
			// 			this.$parent.$emit("update:visible", false);
			// 			this.$refs.formRef.resetFields()
			// 		} else {
			// 			console.log('error submit!!');
			// 			return false;
			// 		}
			// 	});
			// },
			// onCancel() {
			// 	this.$parent.$emit("update:visible", false);
			// 	this.$refs.formRef.resetFields();
			// },
			// async getcommuity(){
			// 	await get({
			// 						url: '/admin/project.Community/index',
			// 	params: {
			// 							...this.searchParam,
			// 							...{
			// 								server_type: this.$route.query.type ? 2 : 1,
			// 								limit:9999
			// 								// search_time:this.searchParam.search_time.length?this.searchParam.search_time.join(' - '):''
			// 							}
			// 						}
			// 					}).then(res => {
			// 						this.comlist = res.list
			// 					})
			// }
		}
	};
</script>
<!-- <style src="@wangeditor/editor/dist/css/style.css"></style> -->
